<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>未完成试卷</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
</head>
<body>
<nav th:replace="student/_fragments :: menu(2)" class="ui inverted  segment">
    <div class="ui container">
        <div class="ui inverted secondary menu">
            <h2 class="ui teal header item">CUMT</h2>
            <h3 class="ui teal header item">在线答题系统</h3>
            <a href="#" class=" active item ">未完成试卷</a>
            <a href="#" class=" item ">已完成试卷</a>

            <div class="right menu   ">
                <div class="ui dropdown item">
                    <div class="text">
                        <!--                        <img src="https://unsplash.it/100/100?image=1005" alt="" class="ui avatar image">-->
                        Zhaohaihang
                    </div>
                    <i class="dropdown icon"></i>
                    <div class="menu">
                        <a href="#" class="item">注销</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</nav>

<div class="ui container">
    <table class="ui celled compact teal table">
        <thead>
        <tr >
            <th>序号</th>
            <th>id</th>
            <th>试卷名称</th>
            <th>创建人</th>
            <th>题目数量</th>
            <th>总分</th>
            <th>开始时间</th>
            <th>结束时间</th>
            <th>状态</th>
            <th>操作</th>
        </tr>
        </thead>

        <tbody>
        <tr th:each="paper,iterStat : ${page}">
            <td th:text="${iterStat.count}">1</td>
            <td th:text="${paper.id}">124</td>
            <td th:text="${paper.name}">第一章练习题</td>
            <td th:text="${paper.teacher.name}">刘老师</td>
            <td th:text="${paper.totalQue}">25</td>
            <td th:text="${paper.totalScore}">100</td>
            <td th:text="${paper.startTime}">2019-12-12 12:12</td>
            <td th:text="${paper.endTime}">2019-12-12 12:12</td>
            <td >
                <span class="ui label" th:text="${paper.status}"
                      th:classappend="${paper.status} eq '正在进行' ? 'green' : ' red '">正在进行</span>
            </td>
            <td>
                <a th:href="@{/student/{paperid}/stu-imcomp-paper-fill(paperid=${paper.id})}" target="_blank" class="ui mini  button"
                   th:classappend="${paper.status} eq '正在进行' ? 'green' : 'disabled'">进入</a>
            </td>
        </tr>
        </tbody>
        <tfoot>
        <tr>
            <th colspan="10">
                <div class="ui  mini  pagination menu" th:if="${page.totalPages}>1">
                    <a href="#" th:href="@{/student/stu-imcomp-paper(page=${page.number}-1)}" class=" item" th:unless="${page.first}">上一页</a>
                    <a href="#" th:href="@{/student/stu-imcomp-paper(page=${page.number}+1)}" class=" item" th:unless="${page.last}">下一页</a>
                </div>
            </th>
        </tr>
        </tfoot>
    </table>
</div>

<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>

<script>
    $('.ui.dropdown').dropdown({
        on: 'hover'
    });
</script>
</body>
</html>